#!/bin/tcsh -f
echo
echo
echo "***                  ***    ***********     **********         ***********    ****       ****  *******        **** ************** ****     ****"
echo " ***                ***   ***************   ***********      ***************   ****     ****   ********       **** ************** ****     ****"
echo "  ***              ***    ****     	    ***      ****    **** 	        *****  ****    **** ****      ****      ****      ****     ****"
echo "   ***            ***     *****		    ***       ****   *****	         *********     ****  ****     ****      ****      ****     ****"
echo "    ***          ***      *************	    ***        ****  *************        *******      ****   ****    ****      ****      *************"
echo "     ***        ***       ***************   ***       ****   ***************       ******      ****    ****   ****      ****      *************"
echo "      ***      ***                 ******   ***       ****            ******  	   ******      ****     ****  ****      ****      ****     ****"
echo "       ***    ***                   *****   ***      ****              *****       ******      ****      **** ****      ****      ****     ****"
echo "        ***  ***          ***************   ***********      ***************       ******      ****       ********      ****      ****     ****"
echo "         ******             ***********     **********         ***********         ******      ****        *******      ****      ****     ****"
echo ""
echo "			An unique User Interface (UI) that will take RTL netlist & SDC constraints as an input, and will generate "
echo "			sythnesized netlist & pre-layout timing report as an output. It uses Yosys open-source tool for synthesis"
echo "						and Opentimer to generate pre-layout timing reports."
echo " "
echo "					Developed and Maintained by VLSI System Design Corporation Pvt. Ltd."
echo "				       For any queries and bugs, please drop a mail to kunalpghosh@gmail.com"
echo ""
echo "						 ********* A vlsisystemdesign.com initiative *********	"
echo 

set my_work_dir = `pwd`

#---------------------------------------------------------------------#
#------------------------ Tool initialization ------------------------#
#---------------------------------------------------------------------#

if ($#argv != 1) then 
	echo "Info: Please provide the csv file"
	exit 1
endif

if (! -f $argv[1] || $argv[1] == "-help") then
        if ($argv[1] != "-help") then
                echo "Error:  Cannot find csv file $argv[1]. Exiting..."
                exit 1
        else
                echo USAGE: ./vsdflow \<csv file\>
                echo
                echo         where \<csv file\> consists of 2 columns, below keyword being in 1st column and is Case Sensitive. Please request VSD team for sample csv file
                echo
                echo         \<Design Name\> is the name of top level module
                echo
                echo         \<Output Directory\> is the name of output directory where you want to dump synthesis script, synthesized netlist and timing reports
                echo
                echo         \<Netlist Directory\> is the name of directory where all RTL netlist are present
                echo
                echo         \<Early Library Path\> is the file path of the early cell library to be used for STA
                echo
                echo         \<Late Library Path\> is file path of the late cell library to be used for STA
                echo
                echo         \<Constraints file\> is csv file path of constraints to be used for STA
                echo
                exit 1
        endif
else
		tclsh vsdflow.tcl $argv[1]
endif


